package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ AwNewsTypesModel = (*customAwNewsTypesModel)(nil)

type (
	// AwNewsTypesModel is an interface to be customized, add more methods here,
	// and implement the added methods in customAwNewsTypesModel.
	AwNewsTypesModel interface {
		awNewsTypesModel
		withSession(session sqlx.Session) AwNewsTypesModel
	}

	customAwNewsTypesModel struct {
		*defaultAwNewsTypesModel
	}
)

// NewAwNewsTypesModel returns a model for the database table.
func NewAwNewsTypesModel(conn sqlx.SqlConn) AwNewsTypesModel {
	return &customAwNewsTypesModel{
		defaultAwNewsTypesModel: newAwNewsTypesModel(conn),
	}
}

func (m *customAwNewsTypesModel) withSession(session sqlx.Session) AwNewsTypesModel {
	return NewAwNewsTypesModel(sqlx.NewSqlConnFromSession(session))
}
